package com.rcloud.server.sealtalk.domain;

import com.rcloud.server.sealtalk.model.ExpressContent;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * 快递信息表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "express_info")
public class ExpressInfo {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id")
    private Integer id;

    /**
     * 快递单号
     */
    @Column(name = "`no`")
    private String no;

    /**
     * 快递公司编码
     */
    @Column(name = "`type`")
    private String type;

    /**
     * 结果集数组
     */
    @Column(name = "list")
    private String list;

    /**
     * 物流状态：-1：单号或代码错误；0：暂无轨迹；1:快递收件；2：在途中；3：签收；4：问题件 5.疑难件 6.退件签收
     */
    @Column(name = "`state`")
    private String state;

    /**
     * 快递名称
     */
    @Column(name = "`name`")
    private String name;

    /**
     * 快递公司官网
     */
    @Column(name = "site")
    private String site;

    /**
     * 快递公司电话
     */
    @Column(name = "phone")
    private String phone;

    /**
     * 快递员 或 快递站(没有则为空)
     */
    @Column(name = "courier")
    private String courier;

    /**
     * 快递员电话(没有则为空)
     */
    @Column(name = "courier_phone")
    private String courierPhone;

    /**
     * 快递轨迹信息最新时间
     */
    @Column(name = "update_time")
    private String updateTime;

    /**
     * 发货到收货消耗时长 (截止最新轨迹)
     */
    @Column(name = "take_time")
    private String takeTime;

    /**
     * 快递公司logo
     */
    @Column(name = "logo")
    private String logo;

    /**
     * 初次调用人
     */
    @Column(name = "create_by")
    private Integer createBy;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 结果集数组
     */
    @Transient
    private List<ExpressContent> dataArray;
}